package com.miracle.system.mapper;

import java.util.List;

import com.miracle.system.domain.SysResource;
import org.apache.ibatis.annotations.Param;

/**
 * 菜单表 数据层
 *
 * @author miracle
 */
public interface SysResourceMapper
{
     /**
     * 根据用户查询系统菜单列表
     *
     * @param userId 用戶Id
     * @return 菜单列表
     */
    public List<SysResource> selectResourceByUserId(Integer userId);

    /**
     * 根据用户ID查询权限
     *
     * @param userId 用户ID
     * @return 权限列表
     */
    public List<String> selectPermissionListByUserId(Integer userId);

    public List<SysResource> selectResourceList(SysResource resource);

    public Integer insertResource(SysResource resource);

    public Integer updateResource(SysResource resource);

    public List<SysResource> selectResourceByParentResourceId(@Param("parentResourceId") Integer parentResourceId);

    public SysResource selectResourceByResourceId(Integer resourceId);

    public Integer deleteResourceByResourceIds(Integer[] resourceIds);

    public List<SysResource> selectResourceByRoleId(Integer roleId);

    public SysResource remoteCheckResource(SysResource resource);
}
